package cn.itcast.bos.service.take_delivery;

import java.util.Date;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import cn.itcast.bos.domain.page.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;

public interface PromotionService {

	
	//保存宣传任务
	public void save(Promotion promotion);

	
	//分页查询 
	public Page<Promotion> findPageDate(Pageable pageable);
  
	
   //根据page 和rows 返回分页数据
	@Path("/pageQuery")
	@GET
	@Produces({"application/xml","application/json"})
  PageBean<Promotion> findPageDaate(
		   @QueryParam("page") int page,
		   @QueryParam("rows") int rows
		  );
	
	
	//宣传活动的详情页面显示 根据id查询到指定的promotion对象返回给请求端
	@Path("/promotion/{id}")
	@GET
	@Produces({"application/xml","application/json"})
	Promotion findById(@PathParam("id") Integer id);

    //quartz框架每隔一分钟就执行一次job类中的方法
	public void updateStatus(Date date);
	
}
